﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ServisniList
{
    static class StartnaTocka
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.ThreadException += new ThreadExceptionEventHandler(new ThreadExceptionHandler().ApplicationThreadException);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            new UlaznaForma().Show();
            Application.Run();
        }


    }

    public class ThreadExceptionHandler
    {
        public void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
        {
            MessageBox.Show("Dogodila se greška u aplikaciji - pogledajte log datoteku za više informacija !");
            Rukovatelji.Logiranje.SaveToLogFile(e.Exception.Message, e.Exception);
        }
    }
}
